package 
{
	import flash.display.Sprite;
	import flash.events.Event;
	import framework.LayerManager;
	import framework.LvManager;
	import framework.Timepiece;
	
	/**
	 * 塔防项目
	 * @author Henrylee{henrylee_sz@qq.com}
	 */
	public class Main extends Sprite 
	{
		
		public function Main():void 
		{
			if (stage) init();
			else addEventListener(Event.ADDED_TO_STAGE, init);
		}
		
		private function init(e:Event = null):void 
		{
			removeEventListener(Event.ADDED_TO_STAGE, init);
			GlobalVar.main = this;
			LayerManager.instance.init();
			Timepiece.instance.initStage(this.stage);
			
			LvManager.instance.enterLevel(1);
		}
		
	}
	
}